import http from "./http";

export default {
	// 登录
	login(params) {
		return http.post("/user/userLogin", params);
	},
	//   修改业主
	editUser(params) {
		return http.put("/user/updateUser", params);
	},
	/**
	 * @description 获取用户房间
	 */
	getRoomByUserId(params) {
		return http.get("/roomUser/getUserOwnRoom", { params });
	},
	/**
	 * @description 用户购房
	 */
	addRoomByUser(params) {
		return http.post("/roomUser/addRoomUser", params);
	},
	/**
	 * @description 获取所有未售房屋
	 */
	getAllRoom() {
		return http.get("/roomUser/getAllNotShellRoom");
	},
	/**
	 * @description 删除房子
	 */
	deleteRoom(params) {
		return http.delete("/roomUser/deleteRoomUser", { params });
	},
	/**
	 * @description 获取用户车位
	 */
	getStallByUserId(params) {
		return http.get("/userStall/getUserOwnStall", { params });
	},
	/**
	 * @description 用户购车位
	 */
	addStallByUser(params) {
		return http.post("/userStall/addUserStall", params);
	},
	/**
	 * @description 获取所有未售车位
	 */
	getAllStall() {
		return http.get("/userStall/getAllNotShellStall");
	},
	/**
	 * @description 删除车位
	 */
	deleteStall(params) {
		return http.delete("/userStall/deleteUserStall", { params });
	},
};
